diff --git a/system/database/DB_result.php b/system/database/DB_result.php
index 06eec51..e832283 100644
--- a/system/database/DB_result.php
+++ b/system/database/DB_result.php
@@ -32,7 +32,7 @@
 	var $result_id		  = NULL;
 	var $result_array	  = array();
 	var $result_object	  = array();
- var $custom_result_object = array();
+	var $custom_result_object = array();
 	var $current_row	  = 0;
 	var $num_rows		  = 0;
 	var $row_data		  = NULL;
@@ -47,47 +47,52 @@
 	 */
 	function result($type = 'object')
 	{
-  if ($type == 'array') return $this->result_array();
-  else if ($type == 'object') return $this->result_object();
-  else return $this->custom_result_object($type);
+		if ($type == 'array') return $this->result_array();
+		else if ($type == 'object') return $this->result_object();
+		else return $this->custom_result_object($type);
 	}
 
 	// --------------------------------------------------------------------
 
- /**
-  * Custom query result.
-  *
-  * @param class_name A string that represents the type of object you want back
-  * @return array of objects
-  */
- function custom_result_object($class_name)
- {
-  if (array_key_exists($class_name, $this->custom_result_object))
-  {
-   return $this->custom_result_object[$class_name];
-  }
+	/**
+	 * Custom query result.
+	 *
+	 * @param class_name A string that represents the type of object you want back
+	 * @return array of objects
+	 */
+	function custom_result_object($class_name)
+	{
+		if (array_key_exists($class_name, $this->custom_result_object))
+		{
+			return $this->custom_result_object[$class_name];
+		}
 
-  if ($this->result_id === FALSE OR $this->num_rows() == 0)
-  {
-   return array();
-  }
+		if ($this->result_id === FALSE OR $this->num_rows() == 0)
+		{
+			return array();
+		}
 
-  // add the data to the object
-  $this->_data_seek(0);
-  $result_object = array();
+		// add the data to the object
+		$this->_data_seek(0);
+		$result_object = array();
+
 		while ($row = $this->_fetch_object())
-  {
-   $object = new $class_name();
-   foreach ($row as $key => $value)
-   {
-    $object->$key = $value;
-   }
+		{
+			$object = new $class_name();
+			
+			foreach ($row as $key => $value)
+			{
+				$object->$key = $value;
+			}
+			
 			$result_object[] = $object;
 		}
 
-  // return the array
-  return $this->custom_result_object[$class_name] = $result_object;
- }
+		// return the array
+		return $this->custom_result_object[$class_name] = $result_object;
+	}
+
+	// --------------------------------------------------------------------
 
 	/**
 	 * Query result. "object" version.
@@ -180,9 +185,9 @@
 			$n = 0;
 		}
 
-  if ($type == 'object') return $this->row_object($n);
-  else if ($type == 'array') return $this->row_array($n);
-  else return $this->custom_row_object($n, $type);
+		if ($type == 'object') return $this->row_object($n);
+		else if ($type == 'array') return $this->row_array($n);
+		else return $this->custom_row_object($n, $type);
 	}
 
 	// --------------------------------------------------------------------
@@ -219,7 +224,7 @@
 
 	// --------------------------------------------------------------------
 
- /**
+	/**
 	 * Returns a single result row - custom object version
 	 *
 	 * @access	public
@@ -242,7 +247,7 @@
 		return $result[$this->current_row];
 	}
 
- /**
+	/**
 	 * Returns a single result row - object version
 	 *
 	 * @access	public
